package com.ts.api.module.api.convert.receive.handler;

import com.gitee.apanlh.web.model.vo.RequestVO;
import com.ts.api.module.api.convert.receive.entity.ApiReceiveDecrypt;
import com.ts.api.module.api.convert.receive.entity.ApiReceivePhoneMd5DataExchange;
import com.ts.api.module.api.entity.ApiUserRequest;

import java.util.Map;

/**
 *  API渠道-前置处理器
 */
public interface ApiReceiveExistConvertHandler {

    /**
     *  接收数据解密方法
     *
     *  @param  requestVO   请求VO实体
     *  @return ApiReceiveDecryptMessage
     */
    ApiReceiveDecrypt decrypt(RequestVO requestVO) throws Exception;

    /**
     *  解析撞库请求
     *
     *  @param  apiReceiveDecrypt
     *  @return ApiUserInfo
     */
    ApiUserRequest parseDataExchange(ApiReceiveDecrypt apiReceiveDecrypt) throws Exception;

    /**
     *  撞库返回实体类
     *
     *  @param  dataExchangeMessage  撞库消息类
     *  @return ApiRespReceiveDataExchange
     */
    Map<String, Object> respDataExchange(ApiReceivePhoneMd5DataExchange dataExchangeMessage) throws Exception;
}
